package ihm;

import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;

public class HiddenButton extends JButton {

	public HiddenButton(ActionListener action, ImageIcon normalState, ImageIcon pressedState) {
		setOpaque(false);
		setContentAreaFilled(false);
		setBorderPainted(false);		
		setFocusPainted(false);	
		if (action != null) { addActionListener(action); }
		if (normalState != null) { this.setIcon(normalState); }
		if (pressedState != null) { this.setPressedIcon(pressedState); }
	}
}
